<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- http://hge.relishgames.com -->

<html>

<head>
<meta name="Keywords" content="game engine, 2d, hardware accelerated, hge, engine, relish games, game development">
<meta name="Description" content="Haaf's Game Engine - Hardware accelerated 2D games engine">
<title>Haaf's Game Engine - Hardware accelerated 2D games engine</title>
<link rel=stylesheet type=text/css href=hge.css>
<script language="JavaScript" src="hge.js"></script>
</head>

<body onload="setContents('cnt_hgefunc.html');" bgcolor=#ffffff text=#000000 link=#7F0000 vlink=#7F0000 alink=#7F0000 marginwidth=0 marginheight=0 leftmargin=0 topmargin=0>
<table height=100% cellspacing=0 cellpadding=0 border=0><tr>

<td valign=top>
<table width=566 cellspacing=0 cellpadding=20 border=0><tr><td>
<h1 style="margin-top:0px">HGE::Effect_PlayEx</h1>
<p>
Starts playing a sound effect with additional parameters.
</p>
<pre>
HCHANNEL Effect_PlayEx(
  HEFFECT <i><b>effect</b></i>,
  int <i><b>volume</b></i> = 100,
  int <i><b>pan</b></i> = 0,
  float <i><b>pitch</b></i> = 1.0,
  bool <i><b>loop</b></i> = false
);
</pre>
<h2>Parameters</h2>
<dl>
<dt><i>effect</i>
<dd>Handle of a sound effect to be played.
<dt><i>volume</i>
<dd>Optional effect volume from 0 to 100. Default is 100, meaning maximum volume.
<dt><i>pan</i>
<dd>Optional effect panning from -100 to 100. Default is 0, meaning center panning.
<dt><i>pitch</i>
<dd>Optional effect pitch multiplier. Default is 1.0, meaning default pitch.
<dt><i>loop</i>
<dd>Optional parameter. If <b>true</b>, the effect is looped until the audio channel is stopped manually. Default is <b>false</b>.
</dl>
<h2>Return value</h2>
<p>
Returns the audio channel handle through which the effect is playing.
Use this handle with audio channel control functions.
</p>
<h2>Remarks</h2>
<p>
Maximum four instances of a particular sample can be played at the same time.
If all four instances are already playing during a call to <b>Effect_PlayEx</b>,
the instance with the lowest volume is restarted with new parameters.
</p>
<h2>Requirements</h2>
<p>
<b>Header:</b> hge.h<br>
<b>Import library:</b> hge.lib
</p>
<h2>See also</h2>
<p>
<a href="hgefunc_effectload.html">Effect_Load</a>,
<a href="hgefunc_effectfree.html">Effect_Free</a>,
<a href="hgefunc_effectplay.html">Effect_Play</a>
</p>
<br>
</td></tr></table>
</td>

</tr></table>
</body>

</html>